package task17;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/30 11:32
 * @description:
 */
public class Task2_18_2 {
  public static void main(String[] args) {
    int[] y=new int[4];
    int[] x={4,3,7};
    y[0]=1;
    y[1]=2;

    y[2]=x[2];
    System.out.println("数组y的多有元素：");
    for(int i=0;i<y.length;i++){
      System.out.println(y[i]+"\t");
    }
    System.out.println();
    y=x;
    System.out.println("执行y=x；输出数组y的所有元素：");
    for (int i=0;i<y.length;i++){
      System.out.println(y[i]+"\t");
    }
    System.out.println();
    x[0]=10;
    System.out.println("y[0]"+y[0]);

  }

}
